import { defineStore } from 'pinia'
import { store } from '@/store/index'
import type { OptionItem } from '@/components/select/type'

interface Options<T> {
  demoOptions: T[];
  gender: T[];
}

export const useDropStore = defineStore('dropOptions', {
  state: (): Options<OptionItem> => {
    return {
      demoOptions: [
        { label: '选项1', value: 'value1' },
        { label: '选项2', value: 'value2' },
        { label: '选项3', value: 'value3' },
        { label: '选项4', value: 'value4' },
        { label: '选项5', value: 'value5' },
        { label: '选项6', value: 'value6' }
      ],
      gender: [
        { label: '男', value: '男' },
        { label: '女', value: '女' }
      ]
    }
  },
  actions: {}
})

export function useDropStoreWithOut () {
  return useDropStore(store)
}
